#pragma once

class EnemyMgr
{
private:
	static const int maxEnemy = 30;

	std::vector<AbstractEnemy *> enemies;

	std::stack<AbstractEnemy *> spawning;

public:
	EnemyMgr();
	~EnemyMgr();

	static EnemyMgr * getInstance();

	bool render();
	bool update(double dtime);

	void add(AbstractEnemy * enemy);

	std::vector<AbstractEnemy *> & getEnemies() { return enemies; }

	void addSpawn(AbstractEnemy * spawn) { spawning.push(spawn); }

	double tagX, tagY;

	bool clear();

	int getAmount() { return enemies.size(); }

	AbstractEnemy * getOne()
	{
		if (enemies.size() == 0)
		{
			return nullptr;
		}
		else
		{
			return enemies[0];
		}
	}
};